/**
 * 
 */
package org.softTank.BC.data;

import java.util.ArrayList;
import java.util.List;

import org.softTank.BC.entity.services.Category;
import org.softTank.BC.entity.services.Type;
import org.springside.modules.test.DataUtils;

/**
 * @author Yuzone
 * 
 */
public class TypeData {


	public static Type getRandomType() {
		String typeName = DataUtils.randomName("type");
		Type type = new Type();
		type.setName(typeName);
		type.setDescription("Description: " + typeName);
		type.setKey(DataUtils.randomName("key"));

		return type;
	}

	public static Type getRandomTypeWithCategory() {
		Type type = getRandomType();
		List<Category> l = new ArrayList<Category>();
		// Category cate = new Category();
		// cate.setId(1L);
		Category cate = CategoryData.getTestCategory();
		l.add(cate);
		type.setCategoryList(l);

		return type;
	}

	public static Type getTypeWithInferiors() {
		Type type = getRandomType();
		type.setName("name");
		type.setKey("key");
		type.setId(1L);
		List<Category> l = new ArrayList<Category>();
		l.add(CategoryData.getCategoryWithInferiors());
		type.setCategoryList(l);

		return type;
	}
}
